//
// Created by Administrator on 2020/8/5.
//
#include <iostream>

int sum(const int *arr, int size) {

    int result = 0;
    std::cout << sizeof(arr) << std::endl;
    for (int i = 0; i < size; i++) {
        result += arr[i];
    }

    return result;

}

int main() {

    int arr[] = {
            1, 2, 3, 4, 5
    };

    int result = sum(arr, 5);

    std::cout << "sizeof(arr) = " << sizeof(arr) << std::endl;
    std::cout << result << std::endl;


    return 0;
}